<template>
 <div class="newsinfo-container">
  <div class="art_pic_card art_content" v-html="newinfo"></div>
    <hr>


    <!-- 评论子组件区域 -->
    <commenthh></commenthh>
  </div>
</template>
<script>
import { Toast } from "mint-ui";
import comment from "../subcomponents/comment.vue";
export default {
  data() {
    return {
      index: this.$route.params.id,
      newinfo: {}
    };
  },
  created() {
    this.getNewsInfo();
  },
  methods: {
    getNewsInfo() {
      console.log(this.index);
      this.$http
        .get("/news/get?channel=头条&start=0&num=100&appkey=055412fc5fee23e4")
        .then(result => {
          if (result.status == 200) {
            this.newinfo = result.body.result.list[this.index].content;
          } else {
            Toast("获取新闻列表失败！");
          }
        });
    }
  },
  components : {
    // 用来注册子组件的节点
    "commenthh"　: comment,
  }
};
</script>
<style >
body{
  overflow-y: auto;
}
.newsinfo-container{
  margin: 53px 0px;
}
.art_content {
  padding: 7px;
  padding-bottom: 50px;
  flex: 1;
}
.art_img_mini_img {
  width: 100%;
}
.art_img_tit {
  font-size: 14px;
}

</style>



